Page({
  data: {
    showTrigger: true,
    showRotatingImage: true,
    showWater:false,
    showButton:false,
    rotateClass: '' ,
    moveAnimationData: {} 
  },
  onReady(){
    this.moveAnimation = wx.createAnimation({
      duration: 800,        
      timingFunction: 'ease-out', 
      delay: 0
    })
  },
  onTriggerClick() {
    this.setData({
      showTrigger: false,
    });

    setTimeout(() => {
      this.setData({
        rotateClass: 'rotate',
        
      });
    }, 50);
    setTimeout(() => {
      this.setData({
        showWater:true
      });
    }, 550);
    this.setData({ showButton: true }, () => {
      setTimeout(() => {
        this.moveAnimation.translateY(-30).step();
        this.setData({
          moveAnimationData: this.moveAnimation.export()
        });
      }, 50);
    });
  }
});
